#pragma once

struct MouseInfo
{
public:
	int Mx,My;
	bool Mleft, Mright, Mmiddle;

	MouseInfo()
	{
		Mx = My = 0;
		Mleft = Mright = Mmiddle = false;
	}

	MouseInfo copy()
	{
		MouseInfo ret;
		ret.Mx = Mx;
		ret.My = My;
		ret.Mleft = Mleft;
		ret.Mright = Mright;
		ret.Mmiddle = Mmiddle;
		return ret;
	}
};

class Input
{
	friend class GLFWApp;

	public:
	  static bool Init();
		static int keyHit(int key);
		static int keyDown(int key);
		static int mouseX();
		static int mouseY();
		static int MouseHit( int button );
		static bool MouseDown( int button );

	private:
		static int keysDown[325];
		static int keysHit[325];
		static MouseInfo Mouse; // Mouse monitor
		static int mouseLeftHits;
		static int mouseMiddleHits;
		static int mouseRightHits;

		static void MouseButtonCallback( int button, int action );
		static void MousePosCallback( int x, int y );
		static void KeyCallback( int key, int action );
		static void CharCallback( int key, int action );
};